package org.example.email.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.example.email.service.IEmailService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Service;

/**
 * @description: EmailServiceImpl
 * @author: e
 * @createDate: 2021/5/30
 */
@Slf4j
@Service
@RefreshScope
public class EmailServiceImpl implements IEmailService {

    @Value("${email.send.username}")
    private String username;

    //模拟发送
    @Override
    public boolean sendEmail(String email, String code) {
        log.info("将有{}发出 到{}",username,email);
        log.info("验证码：{} 发送到邮箱：{} 成功。。。",code,email);
        return true;
    }
}
